<!DOCTYPE html>
<!-- flvjs 播放器 -->
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用flv.js来做直播</title>
</head>

<body>
    <video id="videoElement" controls></video>
</body>

<script src="./flv.min.js"></script>
<script>
    if (flvjs.isSupported()) {
        var videoElement = document.getElementById('videoElement');
        var flvPlayer = flvjs.createPlayer({
            type: 'flv',
            isLive: true,
            url: 'http://nebula-playback.qiniudn.com/test-playback/flv/sample.flv'
        });

        console.log(flvPlayer);
        flvPlayer.attachMediaElement(videoElement);
        flvPlayer.load();
        flvPlayer.play();
    }
</script>

</html>